package com.ccb.test.infrastructure.persistent;

import com.ccb.infrastructure.persistent.dao.IAwardDao;
import com.ccb.infrastructure.persistent.po.Award;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import javax.annotation.Resource;
import java.util.List;

@SpringBootTest
/** 支持spring的依赖注入*/
@RunWith(SpringRunner.class)
public class AwardDaoTest {

    @Resource
    IAwardDao iAwardDao;

    @Test
    public void  testQueryAwardList(){
        List<Award> awards = iAwardDao.queryAwardList();
        awards.forEach(award -> System.out.println(award.getAwardDesc()));
    }
}
